package com.mars.foodserver.controller.app;

import com.mars.foodserver.response.result.R;
import com.mars.foodserver.service.ISysBannerService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wq
 * @version 1.0
 * @date 2021/06/15 14:44
 */
@RestController
@RequestMapping("/banner")
@AllArgsConstructor
public class BannerController {

    private final ISysBannerService sysBannerService;

    /**
     * 广告列表
     *
     * @return R
     */
    @GetMapping("/list")
    public R list() {
        return R.success(sysBannerService.list());
    }


    /**
     * 获取列表
     *
     * @return R
     */
    @PostMapping("/acquire")
    public R acquire() {
        return R.success(sysBannerService.list());
    }


}
